<template>
  <div>
    <!-- 标准屏 -->
    <Standard v-if="isStandard" class="standard-bg" />
    <!-- 大屏 -->
    <Area v-else class="bg" />
  </div>
</template>

<script>
import Area from './areas/Index';
import Standard from './standard/Index';
export default {
  name: 'DafosiControlWebIndex',
  components: {
    Area,
    Standard
  },
  data() {
    return {
      screenWidth: document.body.clientWidth,
      isStandard: false
    };
  },

  watch: {},

  mounted() {
    window.onresize = () =>
      (() => {
        this.screenWidth = document.body.clientWidth;
      })();
    if (this.screenWidth > 1920) {
      this.isStandard = false;
      console.log('大屏方案');
    } else {
      console.log('标准屏幕方案');
      this.isStandard = true;
    }
  },

  methods: {}
};
</script>

<style lang="scss" scoped>
.standard-bg {
  // background-image: url("../../assets/img/decisionAnalysis/standard_bg.png");
  // background-repeat: no-repeat;
  // background-position:1.4rem -5.59rem;
  // background-size: 120rem 62.5625rem;
}
.bg {
  // background-image: url("../../assets/img/decisionAnalysis/area_bg.png");
  // background-repeat: no-repeat;
  // background-size: 216rem 62.5625rem;
}
</style>
